<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
 xmlns:h="http://java.sun.com/jsf/html"
 xmlns:f="http://java.sun.com/jsf/core"
 xmlns:ui="http://java.sun.com/jsf/facelets"
 xmlns:p="http://primefaces.org/ui">
 
<h:head>
<script>
 function temp(){
  var btn = document.getElementById("save");
  alert(btn.onclick="#{editor.value}");
 }
</script>
</h:head>
<h:body>
 <h1>Enter the Exam text</h1>
 
 <h:form id="formm">
 <h:panelGrid columns="2">
 	<p:column>
     	<p:editor id="userEditor" value="#{editor.value}" width="650" height="300"/>
    </p:column>
    <p:column>
     <p:media id="pdfDisplay" value="/resources/OlaExam.pdf" width="650px" height="300px"/>
	 </p:column>
 </h:panelGrid>
  <h:panelGrid columns="2" style="margin-top:10px">  
        <p:commandButton id="submitButton" value="Submit" oncomplete=""  
                         action="#{editor.updateFile}" icon="ui-icon-disk" />  
   
      </h:panelGrid>  
  
   
  </h:form>
</h:body>
</html>